package com.yangquan.thread;

/**
 * RunnableDemo
 * @author yangquan
 * @date 2025/4/6
 * @apiNote
 */
public class RunnableDemo {


    public static void main(String[] args) {

        RunnableExample runnableExample = new RunnableExample();

        Thread thread = new Thread(runnableExample);
        thread.start();
    }
}

class RunnableExample implements Runnable{

    @Override
    public void run() {
        System.out.println("子线程执行了...");
        System.out.println(Thread.currentThread().getName());
    }
}
